<template>
  <div class="memberCenter">
    <div class="memberCenterLeft">
      <div class="memberCenterLeftTop">
        <div class="userinfo">
          <div class="touxiang">
            <img src="../../../../assets/images/touxiang.png" alt="" />
          </div>
          <div class="usertxt">
            <p>张布丁</p>
            <span>四（2）班</span>
            <span>积分：361</span>
          </div>
        </div>
      </div>
      <div class="memberCenterLeftBottom">
        <div
          class="navlist"
          v-for="(item, index) in datas.iconList"
          :key="index"
          @click="imgActive = index"
          :class="[index === imgActive ? 'active' : '']">
          <img :src="index === imgActive ? item.iconPic : item.inactive" />
          <p>{{ item.name }}</p>
        </div>
      </div>
    </div>
    <div class="memberCenterRight">
      <img src="../../../../assets/img/padicon09.png" alt="" />
    </div>
  </div>
</template>
<script>
export default {
  name: "memberCenter",
  props: {
    datas: Object,
  },
  data() {
    return {
      imgActive: 0,
    };
  },
  methods: {
    // isActivePic () {

    // }
  },
};
</script>
<style lang="scss" scoped>
.memberCenter {
  width: 100%;
  display: flex;
  justify-content: space-around;
  .memberCenterLeft {
    width: 30%;
    height: 510px;
    // background: linear-gradient(180deg, #0bc5ab 0%, #078672 100%);
    border-radius: 8px 8px 8px 8px;
    opacity: 1;
    margin-right: 2%;
    .memberCenterLeftTop {
      background: #53ACFF;
      padding: 20px 0;
      border-top-right-radius: 12px;
      border-top-left-radius: 12px;
      .userinfo {
        display: flex;
        img {
          width: 56px;
          height: 56px;
          padding: 20px;
          display: block;
          // margin: 30px auto 10px auto;
        }
        .usertxt{
          margin-top: 15px;
          p{
            font-size: 18px;
            font-weight: bold;
            color: #ffffff;
            line-height: 1px;
          }
          span {
            font-size: 14px;
            font-weight: 400;
            color: rgba(255, 255, 255, 0.6);
            line-height: 25px;
            display: block;
          }
        }
        
      }
    }
    .memberCenterLeftBottom {
      margin: 0px auto;
      background: rgba(255,255,255,0.85);
      padding: 20px 0;
      border-radius: 12px;
      .navlist {
        display: flex;
        align-items: center;
        justify-content: center;
        img {
          width: 32px;
          height: 32px;
          display: block;
          margin-right: 10px;
        }
        p {
          font-size: 16px;
          font-weight: 500;
          color: #ffffff;
        }
      }
      .active {
        width: 182px;
        height: 42px;
        // background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.76) 100%);
        background: linear-gradient( 90deg, #4CC9FF 0%, #1C69FE 67%, #9A34FF 100%);
        box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.1);
        border-radius: 60px;
        margin:0 auto;
        p{
          color:#ffffff;
        }
      }
    }
  }
  .memberCenterRight {
    width: 75%;
    height: 510px;
    border-radius: 8px 8px 8px 8px;
    img {
      width: 100%;
      height: 100%;
    }
  }
}
</style>
